﻿@model IEnumerable<LeadMaster.Models.Surveys>
<div class="spacer"></div>
<h2>@ViewBag.Company</h2>
<div class="spacer"></div>
<table class="listtable contactstable" cellspacing="0" cellpadding="0">
<thead>
<th class="tableheader">Lead Template</th>
<th class="tableheader">Ref</th>
</thead>
<tbody>
@foreach (var item in Model)
{
    <tr>
    <td>@item.LeadTemplate.Title</td>
    <td>@item.Ref</td>
            <td>
            @Html.ActionLink("Edit", "EditSurvey", new { id=item.SurveyID }) |
            @Html.ActionLink("Export Mapping", "ExportMapping", new { surveyID = item.SurveyID }) |
            @Html.ActionLink("Delete", "DeleteSurvey", new { id = item.SurveyID })
        </td>
    </tr>
}
</tbody>
</table>
<div class="spacer"></div>
<input type="button"  value="Create Mapping" id="createmapping"/>
 
 <script type="text/javascript">
     $(document).ready(function () {

         $('#createmapping').click(function () {
             window.location.href = "@(Url.Action("CreateSurveyMapping", "Leads"))?leadID=@(ViewBag.LeadID)";
         });

     });
</script>